package cn.it.infrastructure.mapper;


import cn.it.infrastructure.po.TbUserAndGoods;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author ASUS
* @description 针对表【tb_user_and_goods】的数据库操作Mapper
* @createDate 2024-07-04 17:27:57
* @Entity po.TbUserAndGoods
*/
@Mapper
public interface IUserAndGoodsMapper {

    int deleteByPrimaryKey(Long id);

    int insert(TbUserAndGoods record);

    int insertSelective(TbUserAndGoods record);

    TbUserAndGoods selectByPrimaryKey(Long id);

    /**
     * 排序score字段，查询前十个字段
     * @return
     */
    List<TbUserAndGoods> selectByScore();

    int updateByPrimaryKeySelective(TbUserAndGoods record);

    int updateByPrimaryKey(TbUserAndGoods record);

    /**
     * 用户收藏商品
     * @param userId
     * @return
     */
    List<TbUserAndGoods> userFavorites(Long userId);
}
